

import akka.actor.typed.ActorSystem
import akka.actor.typed.scaladsl.Behaviors
import rs.actor.{JoyStart, JoyCommand, JoySticker}

import java.io.{ByteArrayInputStream, ByteArrayOutputStream, DataInputStream, File, FileInputStream}
import java.time.{LocalDateTime, ZoneOffset}

@main def TestJoy2 = {
  val sys = ActorSystem.create(JoySticker(), "sys")
  val joyCmdHandler = sys.systemActorOf(Behaviors.receive[JoyCommand] { (ctx, msg) =>
    println(s"get msg ${msg}")
    Behaviors.same
  }, "joyHandler")
  sys.tell(JoyStart())
}